<ul class="page_left_list">
    <br>
    {volist name="list" id="val"}
    <li class="{if !$val['prefimg']}no_pic{/if}">
        <div class="ainfo layui-row">
            {if $val['prefimg']}
            <div class="layui-col-md3 layui-col-xs3 fl articleImg">
                <a href="{:url('article/read',array('id'=>$val['id']))}" class="pic">
                    <img src="{:config('web.cdn')}/static/images/loading.gif" data-original="{:img_thumber($val.prefimg,150,100)}" />
                </a>
            </div>
            <h2 class="title layui-col-md9 layui-col-xs9 fl pdl15">
                <a href="{:url('article/read',array('id'=>$val['id']))}" {if $val.title_style}style="{$val.title_style}"{/if}>
                    {if $val.top==1}<span class="layui-badge" style="background: red">顶</span> &nbsp;{/if}
                    {if $val.recommend==1}<span class="layui-badge">荐</span>{/if}
                    {$val.title}
                </a>
            </h2>
            {else /}
            <a href="{:url('article/read',array('id'=>$val['id']))}" class="no_pic layui-col-md0 fl"> </a>
            <h2 class="title layui-col-md12 layui-col-xs12 fl pdl15">
                <a href="{:url('article/read',array('id'=>$val['id']))}" {if $val.title_style}style="{$val.title_style}"{/if}>
                    {if $val.top==1}<span class="layui-badge" style="background: red">顶</span> &nbsp;{/if}
                    {if $val.recommend==1}<span class="layui-badge">荐</span>{/if}
                    {$val.title}
                </a>
            </h2>
            {/if}

            <div class="desc layui-col-md9 layui-col-xs9 fl pdl15">{:strip_tags(mb_substr($val.info,0,150,'utf-8'))}</div>

            <div class="date_hits layui-col-md9 layui-col-xs9 fl pdl15 layui-hide-xs">
                <span class=" layui-col-md4 layui-col-xs6">
                    <a href="{:request()->domain()}{:url('u/index',['id'=>$val.user.id])}">
                        <img src="{:config('web.cdn')}/static/images/heads.png" data-original="{:img_thumber($val.user.headimgurl)}" alt="" class="head">
                        {$val.author}
                    </a>
                </span>
                <span class="layui-col-md3 layui-col-xs6">
                    <i class="layui-icon layui-icon-time"></i>
                    {$val['add_time']}
                </span>

                <span class="layui-col-md2 layui-col-xs6" title="喜欢">
                    <i class="layui-icon layui-icon-heart"></i>
                    <span class="cy_cmt_count">{$val.like}</span>
                </span>

                {if $index_user.username =='admin'}
                {//管理可以修改全部文章}
                <span class="layui-col-md3 layui-col-xs6">
                    <a href="{:url('Uarticle/edit',['id'=>$val.id])}" title="修改">
                        <i class="layui-icon layui-icon-fonts-clear"></i>修改
                    </a>
                </span>
                {/if}
            </div>
        </div>
        <hr class="layui-hide-xs">
    </li>
    {/volist}
</ul>
